//
//  AcceptedModel.m
//  TenThousand
//
//  Created by apple on 16/7/22.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "AcceptedModel.h"

@implementation AcceptedModel

- (id)initWithDictionary:(NSDictionary *)dic {
    if (self = [super init]) {
        
        self.Code = [self stringWithNSObject:[dic objectForKey:@"Code"]];
        self.PayName = [self stringWithNSObject:[dic objectForKey:@"PayName"]];
        self.Rate = [self stringWithNSObject:[dic objectForKey:@"Rate"]];
        self.Ammount = [self stringWithNSObject:[dic objectForKey:@"Ammount"]];
        self.AddDate = [self stringWithNSObject:[dic objectForKey:@"AddDate"]];
        self.Number = [self stringWithNSObject:[dic objectForKey:@"Number"]];
        self.State = [self stringWithNSObject:[dic objectForKey:@"State"]];
        self.Project = [self stringWithNSObject:[dic objectForKey:@"Project"]];
        self.Borrowid = [self stringWithNSObject:[dic objectForKey:@"Borrowid"]];
        self.BorrowListid = [self stringWithNSObject:[dic objectForKey:@"BorrowListid"]];
        
    }
    return self;
}

-(NSString*) stringWithNSObject:(id)_it
{
    if ([_it isKindOfClass:[NSNull class]]) {
        return @"";
    }
    
    if ([_it isKindOfClass:[NSString class]]) {
        return _it;
    }
    
    NSNumber* _num = (NSNumber*)_it;
    return [_num stringValue];
    
}

@end
